package _021_10_8

import "sort"

func FindNumsAppearOnce(array []int) []int {
	// write code here

	hashResult := make(map[int]int)

	for i := 0; i < len(array); i++ {
		_, ok := hashResult[array[i]]
		if !ok {
			hashResult[array[i]] = 1
			continue
		}
		hashResult[array[i]] += 1
	}
	ret := make([]int, 0)
	for i, i2 := range hashResult {
		if i2 == 1 {
			ret = append(ret, i)
		}
	}
	sort.Ints(ret)
	return ret
}
